package by.grsu.coctails.db.task;

import java.util.List;

import android.content.Context;
import by.grsu.coctails.model.Ingredient;

public abstract class GetMyIngredientAsyncTask extends GetIngredientsAsyncTask {

	public GetMyIngredientAsyncTask(Context context, String categoryName) {
		super(context, categoryName);
	}

	@Override
	protected List<Ingredient> load() {
		if (getCategoryName() != null && !getCategoryName().equals("")) {
			return getDbManager().getMyIngredientsByCategory(getCategoryName());
		}
		return getDbManager().getAllMyIngredients();

	}

}
